package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AccountDetailFallBack;
import cn.cs.fallback.WxAccessFallBack;
import cn.cs.pojo.AccountDetail;
import cn.cs.pojo.WxAccessToken;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-pay-provider", configuration = CsConfiguration.class, fallback = WxAccessFallBack.class)
public interface WxAccessClient {



    @RequestMapping(value = "/getWxAccessTokenById", method = RequestMethod.POST)
    public WxAccessToken getWxAccessTokenById(@RequestParam("id") String id);

    @RequestMapping(value = "/getWxAccessTokenListByMap", method = RequestMethod.POST)
    public List<WxAccessToken> getWxAccessTokenListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getWxAccessTokenCountByMap", method = RequestMethod.POST)
    public Integer getWxAccessTokenCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/addWxAccessToken", method = RequestMethod.POST)
    public Integer addWxAccessToken(@RequestBody WxAccessToken wxAccessToken) throws Exception;

    @RequestMapping(value = "/modifyWxAccessToken", method = RequestMethod.POST)
    public Integer modifyWxAccessToken(@RequestBody WxAccessToken wxAccessToken) throws Exception;

    @RequestMapping(value = "/deleteWxAccessTokenById", method = RequestMethod.POST)
    public Integer deleteWxAccessTokenById(@RequestParam("id") Long id) throws Exception;

}

